package com.bangdream.michelia.application;

import com.alibaba.fastjson.JSON;
import com.bangdream.michelia.entity.QuestAnswerBean;

import java.util.ArrayList;
import java.util.List;



/**
 * Created by Mr.Wang on 2017/10/18.
 * 909732184@qq.com
 * 保存问卷的数据
 */

public class AppQuestData {
    private static final String TAG = "AppQuestData";
    private static volatile AppQuestData mInstance;
    private List<QuestAnswerBean> questAnswerList = new ArrayList<>();

    public List<QuestAnswerBean> getQuestAnswerList() {
        return questAnswerList;
    }

    public void setQuestAnswerList(List<QuestAnswerBean> questAnswerList) {
        this.questAnswerList = questAnswerList;
    }

    private AppQuestData() {
    }

    public static AppQuestData getInstance(){
        if (mInstance == null) {
            synchronized (AppQuestData.class) {
                if (mInstance == null) {
                    mInstance = new AppQuestData();
                }
            }
        }
        return mInstance;
    }

    //获取当前登录的用户信息
    /*public UserBean getUserInfo()
    {
        String stUserInfo = (String) SPUtils.get(MainApplication.getContext(), PublicResources.SpKeyUserInfo,"");
        L.d("获取到的用户信息为："+stUserInfo);
        UserBean userBean = null;
        try {
            userBean = JSON.parseObject(stUserInfo,UserBean.class);
        }catch (Exception e){
            userBean=new UserBean();
            L.e(e.toString());
        }
        return userBean;
    }*/

}
